package controller

import (
	"gin-shop-admin/repository"
	"github.com/gin-gonic/gin"
	"net/http"
)

func GetReportData(c *gin.Context) {
	date_list, area_list, data_list, err := repository.GetReportData()
	if err != nil {
		c.JSON(302, gin.H{"msg": err})
	} else {
		c.JSON(http.StatusOK, gin.H{"msg": "success", "date_list": date_list, "area_list": area_list, "data_list": data_list})
	}
	return
}
